package com.liao.order.feign;

import com.liao.common.entity.order.OrderItemEntity;
import com.liao.common.entity.product.SkuEntity;
import com.liao.common.utils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @Author: ljt
 * @Description: 商品远程调用
 * @DateTime: 2025/3/14 上午10:25
 **/
@FeignClient("youyoumall-product")
public interface ProductFeignService {
    @RequestMapping("product/sku/lock")
    Result lock(@RequestBody List<OrderItemEntity> orderItemEntities);

    /**
     * 获取sku信息
     *
     * @param skuId
     * @return
     */
    @RequestMapping("product/sku/info/{skuId}")
    Result<SkuEntity> getSkuinfo(@PathVariable(value = "skuId") String skuId);

}
